home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 January: Mac OS SDK / Dev.CD Jan 96 SDK / Dev.CD Jan 96 SDK1.toast / Development Kits (Disc 1) / Display Manager / Compiler & Runtime Files / • New universal header files • / PInterfaces / Video.p < prev   
Encoding:
Text File  |  1995-07-18  |  26.8 KB  |  666 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        Video.p
  3.  
  4.      Contains:    Video Driver Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Package:    Universal Interfaces in “Display Manager Development Kit” (post ETO #18)
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. }
  19.  
  20. {$IFC UNDEFINED UsingIncludes}
  21. {$SETC UsingIncludes := 0}
  22. {$ENDC}
  23.  
  24. {$IFC NOT UsingIncludes}
  25.  UNIT Video;
  26.  INTERFACE
  27. {$ENDC}
  28.  
  29. {$IFC UNDEFINED __VIDEO__}
  30. {$SETC __VIDEO__ := 1}
  31.  
  32. {$I+}
  33. {$SETC VideoIncludes := UsingIncludes}
  34. {$SETC UsingIncludes := 1}
  35.  
  36.  
  37. {$IFC UNDEFINED __QUICKDRAW__}
  38. {$I Quickdraw.p}
  39. {$ENDC}
  40. {    Types.p                                                        }
  41. {        ConditionalMacros.p                                        }
  42. {    MixedMode.p                                                    }
  43. {    QuickdrawText.p                                                }
  44.  
  45. {$PUSH}
  46. {$ALIGN MAC68K}
  47. {$LibExport+}
  48.  
  49. CONST
  50.     mBaseOffset                    = 1;                            {Id of mBaseOffset.}
  51.     mRowBytes                    = 2;                            {Video sResource parameter Id's }
  52.     mBounds                        = 3;                            {Video sResource parameter Id's }
  53.     mVersion                    = 4;                            {Video sResource parameter Id's }
  54.     mHRes                        = 5;                            {Video sResource parameter Id's }
  55.     mVRes                        = 6;                            {Video sResource parameter Id's }
  56.     mPixelType                    = 7;                            {Video sResource parameter Id's }
  57.     mPixelSize                    = 8;                            {Video sResource parameter Id's }
  58.     mCmpCount                    = 9;                            {Video sResource parameter Id's }
  59.     mCmpSize                    = 10;                            {Video sResource parameter Id's }
  60.     mPlaneBytes                    = 11;                            {Video sResource parameter Id's }
  61.     mVertRefRate                = 14;                            {Video sResource parameter Id's }
  62.     mVidParams                    = 1;                            {Video parameter block id.}
  63.     mTable                        = 2;                            {Offset to the table.}
  64.     mPageCnt                    = 3;                            {Number of pages}
  65.     mDevType                    = 4;                            {Device Type}
  66.     oneBitMode                    = 128;                            {Id of OneBitMode Parameter list.}
  67.     twoBitMode                    = 129;                            {Id of TwoBitMode Parameter list.}
  68.     fourBitMode                    = 130;                            {Id of FourBitMode Parameter list.}
  69.     eightBitMode                = 131;                            {Id of EightBitMode Parameter list.}
  70.  
  71.     sixteenBitMode                = 132;                            {Id of SixteenBitMode Parameter list.}
  72.     thirtyTwoBitMode            = 133;                            {Id of ThirtyTwoBitMode Parameter list.}
  73.     firstVidMode                = 128;                            {The new, better way to do the above. }
  74.     secondVidMode                = 129;                            { QuickDraw only supports six video }
  75.     thirdVidMode                = 130;                            { at this time.      }
  76.     fourthVidMode                = 131;
  77.     fifthVidMode                = 132;
  78.     sixthVidMode                = 133;
  79.     spGammaDir                    = 64;
  80.     spVidNamesDir                = 65;
  81.  
  82. { csTimingFormat values in VDTimingInfo }
  83. { look in the declaration rom for timing info }
  84.     kDeclROMtables                = 'decl';
  85.  
  86. { Timing mode constants for Display Manager MultiMode support
  87.     Corresponding    .h equates are in Video.h
  88.                     .a equates are in Video.a
  89.                     .r equates are in DepVideoEqu.r
  90.     
  91.     The first enum is the old names (for compatibility).
  92.     The second enum is the new names.
  93. }
  94.     timingApple12                = 130;                            {  512x384 (60 Hz) Rubik timing.}
  95.     timingApple12x                = 135;                            {  560x384 (60 Hz) Rubik-560 timing.}
  96.     timingApple13                = 140;                            {  640x480 (67 Hz) HR timing.}
  97.     timingApple13x                = 145;                            {  640x400 (67 Hz) HR-400 timing.}
  98.     timingAppleVGA                = 150;                            {  640x480  (60 Hz) VGA timing.}
  99.     timingApple15                = 160;                            {  640x870 (75 Hz) FPD timing.}
  100.     timingApple15x                = 165;                            {  640x818 (75 Hz) FPD-818 timing.}
  101.     timingApple16                = 170;                            {  832x624 (75 Hz) GoldFish timing.}
  102.     timingAppleSVGA                = 180;                            {  800x600  (56 Hz) SVGA timing.}
  103.     timingApple1Ka                = 190;                            { 1024x768 (60 Hz) VESA 1K-60Hz timing.}
  104.     timingApple1Kb                = 200;                            { 1024x768 (70 Hz) VESA 1K-70Hz timing.}
  105.     timingApple19                = 210;                            { 1024x768  (75 Hz) Apple 19" RGB.}
  106.     timingApple21                = 220;                            { 1152x870  (75 Hz) Apple 21" RGB.}
  107.  
  108.     timingInvalid                = 0;                            { Unknown timing… force user to confirm.}
  109.     timingApple_512x384_60hz    = 130;                            {  512x384  (60 Hz) Rubik timing.}
  110.     timingApple_560x384_60hz    = 135;                            {  560x384  (60 Hz) Rubik-560 timing.}
  111.     timingApple_640x480_67hz    = 140;                            {  640x480  (67 Hz) HR timing.}
  112.     timingApple_640x400_67hz    = 145;                            {  640x400  (67 Hz) HR-400 timing.}
  113.     timingVESA_640x480_60hz        = 150;                            {  640x480  (60 Hz) VGA timing.}
  114.     timingApple_640x870_75hz    = 160;                            {  640x870  (75 Hz) FPD timing.}
  115.     timingApple_640x818_75hz    = 165;                            {  640x818  (75 Hz) FPD-818 timing.}
  116.     timingApple_832x624_75hz    = 170;                            {  832x624  (75 Hz) GoldFish timing.}
  117.     timingVESA_800x600_56hz        = 180;                            {  800x600  (56 Hz) SVGA timing.}
  118.     timingVESA_800x600_60hz        = 182;                            {  800x600  (60 Hz) SVGA timing.}
  119.     timingVESA_800x600_72hz        = 184;                            {  800x600  (72 Hz) SVGA timing.}
  120.     timingVESA_800x600_75hz        = 186;                            {  800x600  (75 Hz) SVGA timing.}
  121.     timingVESA_1024x768_60hz    = 190;                            { 1024x768  (60 Hz) VESA 1K-60Hz timing.}
  122.     timingVESA_1024x768_70hz    = 200;                            { 1024x768  (70 Hz) VESA 1K-70Hz timing.}
  123.     timingVESA_1024x768_75hz    = 204;                            { 1024x768  (75 Hz) VESA 1K-70Hz timing (very similar to timingApple_1024x768_75hz).}
  124.     timingApple_1024x768_75hz    = 210;                            { 1024x768  (75 Hz) Apple 19" RGB.}
  125.     timingApple_1152x870_75hz    = 220;                            { 1152x870  (75 Hz) Apple 21" RGB.}
  126.     timingAppleNTSC_ST            = 230;                            {  512x384  (60 Hz, interlaced, non-convolved).}
  127.     timingAppleNTSC_FF            = 232;                            {  640x480  (60 Hz, interlaced, non-convolved).}
  128.     timingAppleNTSC_STconv        = 234;                            {  512x384  (60 Hz, interlaced, convolved).}
  129.     timingAppleNTSC_FFconv        = 236;                            {  640x480  (60 Hz, interlaced, convolved).}
  130.     timingApplePAL_ST            = 238;                            {  640x480  (50 Hz, interlaced, non-convolved).}
  131.     timingApplePAL_FF            = 240;                            {  768x576  (50 Hz, interlaced, non-convolved).}
  132.     timingApplePAL_STconv        = 242;                            {  640x480  (50 Hz, interlaced, convolved).}
  133.     timingApplePAL_FFconv        = 244;                            {  768x576  (50 Hz, interlaced, convolved).}
  134.     timingVESA_1280x960_75hz    = 250;                            { 1280x960  (75 Hz)}
  135.     timingVESA_1280x1024_60hz    = 260;                            { 1280x1024 (60 Hz)}
  136.     timingVESA_1280x1024_75hz    = 262;                            { 1280x1024 (75 Hz)}
  137.     timingVESA_1600x1200_60hz    = 280;                            { 1600x1200 (60 Hz) VESA proposed timing.}
  138.     timingVESA_1600x1200_65hz    = 282;                            { 1600x1200 (65 Hz) VESA proposed timing.}
  139.     timingVESA_1600x1200_70hz    = 284;                            { 1600x1200 (70 Hz) VESA proposed timing.}
  140.     timingVESA_1600x1200_75hz    = 286;                            { 1600x1200 (75 Hz) VESA proposed timing.}
  141.     timingVESA_1600x1200_80hz    = 288;                            { 1600x1200 (80 Hz) VESA proposed timing (pixel clock is 216 Mhz dot clock).}
  142.  
  143. { csConnectFlags values in VDDisplayConnectInfo }
  144.     kAllModesValid                = 0;                            { All modes not trimmed by primary init are good close enough to try }
  145.     kAllModesSafe                = 1;                            { All modes not trimmed by primary init are know to be safe }
  146.     kReportsTagging                = 2;                            { Can detect tagged displays (to identify smart monitors) }
  147.     kHasDirectConnection        = 3;                            { True implies that driver can talk directly to device (e.g. serial data link via sense lines) }
  148.     kIsMonoDev                    = 4;                            { Says whether there’s an RGB (0) or Monochrome (1) connection. }
  149.     kUncertainConnection        = 5;                            { There may not be a display (no sense lines?). }
  150.     kTaggingInfoNonStandard        = 6;                            { Set when csConnectTaggedType/csConnectTaggedData are non-standard (i.e., not the Apple CRT sense codes). }
  151.     kReportsDDCConnection        = 7;                            { Card can do ddc (set kHasDirectConnect && kHasDDCConnect if you actually found a ddc display). }
  152.     kHasDDCConnection            = 8;                            { Card has ddc connect now. }
  153.  
  154. { csDisplayType values in VDDisplayConnectInfo }
  155.     kUnknownConnect                = 1;                            { Not sure how we’ll use this, but seems like a good idea. }
  156.     kPanelConnect                = 2;                            { For use with fixed-in-place LCD panels. }
  157.     kPanelTFTConnect            = 2;                            { Alias for kPanelConnect }
  158.     kFixedModeCRTConnect        = 3;                            {  For use with fixed-mode (i.e., very limited range) displays. }
  159.     kMultiModeCRT1Connect        = 4;                            { 320x200 maybe, 12" maybe, 13" (default), 16" certain, 19" maybe, 21" maybe }
  160.     kMultiModeCRT2Connect        = 5;                            { 320x200 maybe, 12" maybe, 13" certain, 16" (default), 19" certain, 21" maybe }
  161.     kMultiModeCRT3Connect        = 6;                            { 320x200 maybe, 12" maybe, 13" certain, 16" certain, 19" default, 21" certain }
  162.     kMultiModeCRT4Connect        = 7;                            { Expansion to large multi mode (not yet used) }
  163.     kModelessConnect            = 8;                            { Expansion to modeless model (not yet used) }
  164.     kFullPageConnect            = 9;                            { 640x818 (to get 8bpp in 512K case) and 640x870 (these two only) }
  165.     kVGAConnect                    = 10;                            { 640x480 VGA default -- question everything else }
  166.     kNTSCConnect                = 11;                            { NTSC ST (default), FF, STconv, FFconv }
  167.     kPALConnect                    = 12;                            { PAL ST (default), FF, STconv, FFconv }
  168.     kHRConnect                    = 13;                            { Straight-6 connect -- 640x480 and 640x400 (to get 8bpp in 256K case) (these two only) }
  169.     kPanelFSTNConnect            = 14;                            { For use with fixed-in-place LCD FSTN (aka “Supertwist”) panels }
  170.     kMonoTwoPageConnect            = 15;                            { 1152x870 Apple color two-page display }
  171.     kColorTwoPageConnect        = 16;                            { 1152x870 Apple B&W two-page display }
  172.     kColor16Connect                = 17;                            { 832x624 Apple B&W two-page display }
  173.     kColor19Connect                = 18;                            { 1024x768 Apple B&W two-page display }
  174.  
  175. { csTimingFlags values in VDTimingInfoRec }
  176.     kModeValid                    = 0;                            { Says that this mode should NOT be trimmed. }
  177.     kModeSafe                    = 1;                            { This mode does not need confirmation }
  178.     kModeDefault                = 2;                            { This is the default mode for this type of connection }
  179.     kModeShowNow                = 3;                            { This mode should always be shown (even though it may require a confirm) }
  180.     kModeNotResize                = 4;                            { This mode should not be used to resize the display (eg. mode selects a different connector on card) }
  181.     kModeRequiresPan            = 5;                            { This mode has more pixels than are actually displayed }
  182.     kModeInterlaced                = 6;                            { This mode is interlaced (single pixel lines look bad). }
  183.  
  184. { csResolutionFlags bit flags for VDResolutionInfoRec }
  185.     kResolutionHasMultipleDepthSizes = 0;                        { Says that this mode has different csHorizontalPixels, csVerticalLines at different depths (usually slightly larger at lower depths) }
  186.  
  187. {    Power Mode constants for VDPowerStateRec.powerState.    }
  188.     kAVPowerOff                    = 0;
  189.     kAVPowerStandby                = 1;
  190.     kAVPowerSuspend                = 2;
  191.     kAVPowerOn                    = 3;
  192.  
  193. {    Power Mode masks and bits for VDPowerStateRec.powerFlags.    }
  194.     kPowerStateNeedsRefresh        = 0;
  195.     kPowerStateNeedsRefreshMask    = 0+(1 * (2**(0)));
  196.  
  197. { Control Codes }
  198.     cscReset                    = 0;
  199.     cscKillIO                    = 1;
  200.     cscSetMode                    = 2;
  201.     cscSetEntries                = 3;
  202.     cscSetGamma                    = 4;
  203.     cscGrayPage                    = 5;
  204.     cscGrayScreen                = 5;
  205.     cscSetGray                    = 6;
  206.     cscSetInterrupt                = 7;
  207.     cscDirectSetEntries            = 8;
  208.     cscSetDefaultMode            = 9;
  209.     cscSwitchMode                = 10;
  210.     cscSetSync                    = 11;
  211.     cscSavePreferredConfiguration = 16;
  212.     cscSetHardwareCursor        = 22;
  213.     cscDrawHardwareCursor        = 23;
  214.     cscSetConvolution            = 24;
  215.     cscSetPowerState            = 25;
  216.     cscUnusedCall                = 127;                            { This call used to expend the scrn resource.  Its imbedded data contains more control info }
  217.  
  218. { Status Codes }
  219.     cscGetMode                    = 2;
  220.     cscGetEntries                = 3;
  221.     cscGetPageCnt                = 4;
  222.     cscGetPages                    = 4;                            { This is what C&D 2 calls it. }
  223.     cscGetPageBase                = 5;
  224.     cscGetBaseAddr                = 5;                            { This is what C&D 2 calls it. }
  225.     cscGetGray                    = 6;
  226.     cscGetInterrupt                = 7;
  227.     cscGetGamma                    = 8;
  228.     cscGetDefaultMode            = 9;
  229.     cscGetCurMode                = 10;
  230.     cscGetSync                    = 11;
  231.     cscGetConnection            = 12;                            { Return information about the connection to the display }
  232.     cscGetModeTiming            = 13;                            { Return timing info for a mode }
  233.     cscGetModeBaseAddress        = 14;                            { Return base address information about a particular mode }
  234.     cscGetScanProc                = 15;                            { QuickTime scan chasing routine }
  235.     cscGetPreferredConfiguration = 16;
  236.     cscGetNextResolution        = 17;
  237.     cscGetVideoParameters        = 18;
  238.     cscGetGammaInfoList            = 20;
  239.     cscRetrieveGammaTable        = 21;
  240.     cscSupportsHardwareCursor    = 22;
  241.     cscGetHardwareCursorDrawState = 23;
  242.     cscGetConvolution            = 24;
  243.     cscGetPowerState            = 25;
  244.  
  245. { Bit definitions for the Get/Set Sync call}
  246.     kDisableHorizontalSyncBit    = 0;
  247.     kDisableVerticalSyncBit        = 1;
  248.     kDisableCompositeSyncBit    = 2;
  249.     kEnableSyncOnBlue            = 3;
  250.     kEnableSyncOnGreen            = 4;
  251.     kEnableSyncOnRed            = 5;
  252.     kNoSeparateSyncControlBit    = 6;
  253.     kHorizontalSyncMask            = $01;
  254.     kVerticalSyncMask            = $02;
  255.     kCompositeSyncMask            = $04;
  256.     kDPMSSyncMask                = $7;
  257.     kSyncOnBlueMask                = $08;
  258.     kSyncOnGreenMask            = $10;
  259.     kSyncOnRedMask                = $20;
  260.     kSyncOnMask                    = $38;
  261.  
  262. {    Power Mode constants for translating DPMS modes to Get/SetSync calls.    }
  263.     kDPMSSyncOn                    = 0;
  264.     kDPMSSyncStandby            = 1;
  265.     kDPMSSyncSuspend            = 2;
  266.     kDPMSSyncOff                = 7;
  267.  
  268.     kConvolved                    = 0;
  269.     kLiveVideoPassThru            = 1;
  270.     kConvolvedMask                = $01;
  271.     kLiveVideoPassThruMask        = $02;
  272.  
  273.  
  274. TYPE
  275.     VPBlock = RECORD
  276.         vpBaseOffset:            LONGINT;                                {Offset to page zero of video RAM (From minorBaseOS).}
  277.         vpRowBytes:                INTEGER;                                {Width of each row of video memory.}
  278.         vpBounds:                Rect;                                    {BoundsRect for the video display (gives dimensions).}
  279.         vpVersion:                INTEGER;                                {PixelMap version number.}
  280.         vpPackType:                INTEGER;
  281.         vpPackSize:                LONGINT;
  282.         vpHRes:                    LONGINT;                                {Horizontal resolution of the device (pixels per inch).}
  283.         vpVRes:                    LONGINT;                                {Vertical resolution of the device (pixels per inch).}
  284.         vpPixelType:            INTEGER;                                {Defines the pixel type.}
  285.         vpPixelSize:            INTEGER;                                {Number of bits in pixel.}
  286.         vpCmpCount:                INTEGER;                                {Number of components in pixel.}
  287.         vpCmpSize:                INTEGER;                                {Number of bits per component}
  288.         vpPlaneBytes:            LONGINT;                                {Offset from one plane to the next.}
  289.     END;
  290.  
  291.     VPBlockPtr = ^VPBlock;
  292.  
  293.     VDEntryRecord = RECORD
  294.         csTable:                Ptr;                                    {(long) pointer to color table entry=value, r,g,b:INTEGER}
  295.     END;
  296.  
  297.     VDEntRecPtr = ^VDEntryRecord;
  298.  
  299. { Parm block for SetGray control call }
  300.     VDGrayRecord = RECORD
  301.         csMode:                    BOOLEAN;                                {Same as GDDevType value (0=color, 1=mono)}
  302.     END;
  303.  
  304.     VDGrayPtr = ^VDGrayRecord;
  305.  
  306. { Parm block for SetInterrupt call }
  307.     VDFlagRecord = RECORD
  308.         csMode:                    SInt8;
  309.     END;
  310.  
  311.     VDFlagRecPtr = ^VDFlagRecord;
  312.  
  313. { Parm block for SetEntries control call }
  314.     VDSetEntryRecord = RECORD
  315.         csTable:                ^ColorSpec;                                {Pointer to an array of color specs}
  316.         csStart:                INTEGER;                                {Which spec in array to start with, or -1}
  317.         csCount:                INTEGER;                                {Number of color spec entries to set}
  318.     END;
  319.  
  320.     VDSetEntryPtr = ^VDSetEntryRecord;
  321.  
  322. { Parm block for SetGamma control call }
  323.     VDGammaRecord = RECORD
  324.         csGTable:                Ptr;                                    {pointer to gamma table}
  325.     END;
  326.  
  327.     VDGamRecPtr = ^VDGammaRecord;
  328.  
  329.     VDBaseAddressInfoRec = RECORD
  330.         csDevData:                LONGINT;                                { LONGINT - (long) timing mode }
  331.         csDevBase:                LONGINT;                                { LONGINT - (long) base address of the mode }
  332.         csModeReserved:            INTEGER;                                { INTEGER - (short) will some day be the depth }
  333.         csModeBase:                LONGINT;                                { LONGINT - (long) reserved }
  334.     END;
  335.  
  336.     VDBaseAddressInfoPtr = ^VDBaseAddressInfoRec;
  337.  
  338.     VDSwitchInfoRec = RECORD
  339.         csMode:                    INTEGER;                                {(word) mode depth}
  340.         csData:                    LONGINT;                                {(long) functional sResource of mode}
  341.         csPage:                    INTEGER;                                {(word) page to switch in}
  342.         csBaseAddr:                Ptr;                                    {(long) base address of page (return value)}
  343.         csReserved:                LONGINT;                                {(long) Reserved (set to 0) }
  344.     END;
  345.  
  346.     VDSwitchInfoPtr = ^VDSwitchInfoRec;
  347.  
  348.     VDTimingInfoRec = RECORD
  349.         csTimingMode:            LONGINT;                                { LONGINT - (long) timing mode (a la InitGDevice) }
  350.         csTimingReserved:        LONGINT;                                { LONGINT - (long) reserved }
  351.         csTimingFormat:            LONGINT;                                { LONGINT - (long) what format is the timing info }
  352.         csTimingData:            LONGINT;                                { LONGINT - (long) data supplied by driver }
  353.         csTimingFlags:            LONGINT;                                { LONGINT - (long) mode within device }
  354.     END;
  355.  
  356.     VDTimingInfoPtr = ^VDTimingInfoRec;
  357.  
  358.     VDDisplayConnectInfoRec = RECORD
  359.         csDisplayType:            INTEGER;                                { INTEGER - (word) Type of display connected }
  360.         csConnectTaggedType:    SInt8; (* unsigned char *)                { BYTE - type of tagging }
  361.         csConnectTaggedData:    SInt8; (* unsigned char *)                { BYTE - tagging data }
  362.         csConnectFlags:            LONGINT;                                { LONGINT - (long) tell us about the connection }
  363.         csDisplayComponent:        LONGINT;                                { LONGINT - (long) if the card has a direct connection to the display, it returns the display component here (FUTURE) }
  364.         csConnectReserved:        LONGINT;                                { LONGINT - (long) reserved }
  365.     END;
  366.  
  367.     VDDisplayConnectInfoPtr = ^VDDisplayConnectInfoRec;
  368.  
  369. { RawSenseCode
  370.     This abstract data type is not exactly abstract.  Rather, it is merely enumerated constants
  371.     for the possible raw sense code values when 'standard' sense code hardware is implemented.
  372.  
  373.     For 'standard' sense code hardware, the raw sense is obtained as follows:
  374.         • Instruct the frame buffer controller NOT to actively drive any of the monitor sense lines
  375.         • Read the state of the monitor sense lines 2, 1, and 0.  (2 is the MSB, 0 the LSB)
  376.  
  377.     IMPORTANT Note: 
  378.     When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants 
  379.     are valid 'csConnectTaggedType' values in 'VDDisplayConnectInfo' 
  380.  
  381. }
  382.     RawSenseCode = CHAR;
  383.  
  384.  
  385. CONST
  386.     kRSCZero                    = 0;
  387.     kRSCOne                        = 1;
  388.     kRSCTwo                        = 2;
  389.     kRSCThree                    = 3;
  390.     kRSCFour                    = 4;
  391.     kRSCFive                    = 5;
  392.     kRSCSix                        = 6;
  393.     kRSCSeven                    = 7;
  394.  
  395. { ExtendedSenseCode
  396.     This abstract data type is not exactly abstract.  Rather, it is merely enumerated constants
  397.     for the values which are possible when the extended sense algorithm is applied to hardware
  398.     which implements 'standard' sense code hardware.
  399.  
  400.      For 'standard' sense code hardware, the extended sense code algorithm is as follows:
  401.     (Note:  as described here, sense line 'A' corresponds to '2', 'B' to '1', and 'C' to '0')
  402.         • Drive sense line 'A' low and read the values of 'B' and 'C'.  
  403.         • Drive sense line 'B' low and read the values of 'A' and 'C'.
  404.         • Drive sense line 'C' low and read the values of 'A' and 'B'.
  405.  
  406.     In this way, a six-bit number of the form BC/AC/AB is generated. 
  407.  
  408.     IMPORTANT Note: 
  409.     When the 'kTaggingInfoNonStandard' bit of 'csConnectFlags' is FALSE, then these constants 
  410.     are valid 'csConnectTaggedData' values in 'VDDisplayConnectInfo' 
  411.  
  412. }
  413.     
  414. TYPE
  415.     ExtendedSenseCode = CHAR;
  416.  
  417.  
  418. CONST
  419.     kESCZero21Inch                = $00;                            { 21" RGB                                 }
  420.     kESCOnePortraitMono            = $14;                            { Portrait Monochrome                     }
  421.     kESCTwo12Inch                = $21;                            { 12" RGB                                }
  422.     kESCThree21InchRadius        = $31;                            { 21" RGB (Radius)                        }
  423.     kESCThree21InchMonoRadius    = $34;                            { 21" Monochrome (Radius)                 }
  424.     kESCThree21InchMono            = $35;                            { 21" Monochrome                        }
  425.     kESCFourNTSC                = $0A;                            { NTSC                                 }
  426.     kESCFivePortrait            = $1E;                            { Portrait RGB                         }
  427.     kESCSixMSB1                    = $03;                            { MultiScan Band-1 (12" thru 1Six")    }
  428.     kESCSixMSB2                    = $0B;                            { MultiScan Band-2 (13" thru 19")        }
  429.     kESCSixMSB3                    = $23;                            { MultiScan Band-3 (13" thru 21")        }
  430.     kESCSixStandard                = $2B;                            { 13"/14" RGB or 12" Monochrome        }
  431.     kESCSevenPAL                = $00;                            { PAL                                    }
  432.     kESCSevenNTSC                = $14;                            { NTSC                                 }
  433.     kESCSevenVGA                = $17;                            { VGA                                     }
  434.     kESCSeven16Inch                = $2D;                            { 16" RGB (GoldFish)                      }
  435.     kESCSevenPALAlternate        = $30;                            { PAL (Alternate)                         }
  436.     kESCSeven19Inch                = $3A;                            { Third-Party 19”                        }
  437.     kESCSevenNoDisplay            = $3F;                            { No display connected                 }
  438.  
  439. { DepthMode
  440.     This abstract data type is used to to reference RELATIVE pixel depths.
  441.     Its definition is largely derived from its past usage, analogous to 'xxxVidMode'
  442.  
  443.     Bits per pixel DOES NOT directly map to 'DepthMode'  For example, on some
  444.     graphics hardware, 'kDepthMode1' may represent 1 BPP, whereas on other
  445.     hardware, 'kDepthMode1' may represent 8BPP.
  446.  
  447.     DepthMode IS considered to be ordinal, i.e., operations such as <, >, ==, etc.
  448.     behave as expected.  The values of the constants which comprise the set are such
  449.     that 'kDepthMode4 < kDepthMode6' behaves as expected.
  450. }
  451.     
  452. TYPE
  453.     DepthMode = INTEGER;
  454.  
  455.  
  456. CONST
  457.     kDepthMode1                    = 128;
  458.     kDepthMode2                    = 129;
  459.     kDepthMode3                    = 130;
  460.     kDepthMode4                    = 131;
  461.     kDepthMode5                    = 132;
  462.     kDepthMode6                    = 133;
  463.  
  464.     kFirstDepthMode                = 128;                            { These constants are obsolete, and just included    }
  465.     kSecondDepthMode            = 129;                            { for clients that have converted to the above        }
  466.     kThirdDepthMode                = 130;                            { kDepthModeXXX constants.                            }
  467.     kFourthDepthMode            = 131;
  468.     kFifthDepthMode                = 132;
  469.     kSixthDepthMode                = 133;
  470.  
  471.  
  472. TYPE
  473.     VDPageInfo = RECORD
  474.         csMode:                    INTEGER;                                {(word) mode within device}
  475.         csData:                    LONGINT;                                {(long) data supplied by driver}
  476.         csPage:                    INTEGER;                                {(word) page to switch in}
  477.         csBaseAddr:                Ptr;                                    {(long) base address of page}
  478.     END;
  479.  
  480.     VDPgInfoPtr = ^VDPageInfo;
  481.  
  482.     VDSizeInfo = RECORD
  483.         csHSize:                INTEGER;                                {(word) desired/returned h size}
  484.         csHPos:                    INTEGER;                                {(word) desired/returned h position}
  485.         csVSize:                INTEGER;                                {(word) desired/returned v size}
  486.         csVPos:                    INTEGER;                                {(word) desired/returned v position}
  487.     END;
  488.  
  489.     VDSzInfoPtr = ^VDSizeInfo;
  490.  
  491.     VDSettings = RECORD
  492.         csParamCnt:                INTEGER;                                {(word) number of params}
  493.         csBrightMax:            INTEGER;                                {(word) max brightness}
  494.         csBrightDef:            INTEGER;                                {(word) default brightness}
  495.         csBrightVal:            INTEGER;                                {(word) current brightness}
  496.         csCntrstMax:            INTEGER;                                {(word) max contrast}
  497.         csCntrstDef:            INTEGER;                                {(word) default contrast}
  498.         csCntrstVal:            INTEGER;                                {(word) current contrast}
  499.         csTintMax:                INTEGER;                                {(word) max tint}
  500.         csTintDef:                INTEGER;                                {(word) default tint}
  501.         csTintVal:                INTEGER;                                {(word) current tint}
  502.         csHueMax:                INTEGER;                                {(word) max hue}
  503.         csHueDef:                INTEGER;                                {(word) default hue}
  504.         csHueVal:                INTEGER;                                {(word) current hue}
  505.         csHorizDef:                INTEGER;                                {(word) default horizontal}
  506.         csHorizVal:                INTEGER;                                {(word) current horizontal}
  507.         csHorizMax:                INTEGER;                                {(word) max horizontal}
  508.         csVertDef:                INTEGER;                                {(word) default vertical}
  509.         csVertVal:                INTEGER;                                {(word) current vertical}
  510.         csVertMax:                INTEGER;                                {(word) max vertical}
  511.     END;
  512.  
  513.     VDSettingsPtr = ^VDSettings;
  514.  
  515.     VDDefMode = RECORD
  516.         csID:                    SInt8; (* UInt8 *)
  517.     END;
  518.  
  519.     VDDefModePtr = ^VDDefMode;
  520.  
  521.     VDSyncInfoRec = RECORD
  522.         csMode:                    SInt8; (* UInt8 *)
  523.         csFlags:                SInt8; (* UInt8 *)
  524.     END;
  525.  
  526.     VDSyncInfoPtr = ^VDSyncInfoRec;
  527.  
  528.     DisplayModeID = LONGINT;
  529.  
  530.     VideoDeviceType = LONGINT;
  531.  
  532.     GammaTableID = LONGINT;
  533.  
  534. { Constants for the GetNextResolution call }
  535.  
  536. CONST
  537.     kDisplayModeIDCurrent        = $0;                            { Reference the Current DisplayModeID }
  538.     kDisplayModeIDInvalid        = $ffffffff;                    { A bogus DisplayModeID in all cases }
  539.     kDisplayModeIDFindFirstResolution = $fffffffe;                { Used in cscGetNextResolution to reset iterator }
  540.     kDisplayModeIDNoMoreResolutions = $fffffffd;                { Used in cscGetNextResolution to indicate End Of List }
  541.  
  542. { Constants for the GetGammaInfoList call }
  543.     kGammaTableIDFindFirst        = $fffffffe;                    { Get the first gamma table ID }
  544.     kGammaTableIDNoMoreTables    = $fffffffd;                    { Used to indicate end of list }
  545.     kGammaTableIDSpecific        = $0;                            { Return the info for the given table id }
  546.  
  547.  
  548. TYPE
  549.     VDResolutionInfoRec = RECORD
  550.         csPreviousDisplayModeID: DisplayModeID;                            { ID of the previous resolution in a chain }
  551.         csDisplayModeID:        DisplayModeID;                            { ID of the next resolution }
  552.         csHorizontalPixels:        LONGINT;                                { # of pixels in a horizontal line at the max depth }
  553.         csVerticalLines:        LONGINT;                                { # of lines in a screen at the max depth }
  554.         csRefreshRate:            Fixed;                                    { Vertical Refresh Rate in Hz }
  555.         csMaxDepthMode:            DepthMode;                                { 0x80-based number representing max bit depth }
  556.         csResolutionFlags:        LONGINT;                                { Reserved - flag bits }
  557.         csReserved:                LONGINT;                                { Reserved }
  558.     END;
  559.  
  560.     VDResolutionInfoPtr = ^VDResolutionInfoRec;
  561.  
  562.     VDVideoParametersInfoRec = RECORD
  563.         csDisplayModeID:        DisplayModeID;                            { the ID of the resolution we want info on }
  564.         csDepthMode:            DepthMode;                                { The bit depth we want the info on (0x80 based) }
  565.         csVPBlockPtr:            VPBlockPtr;                                { Pointer to a video parameter block }
  566.         csPageCount:            LONGINT;                                { Number of pages supported by the resolution }
  567.         csDeviceType:            VideoDeviceType;                        { Device Type:  Direct, Fixed or CLUT; }
  568.         csReserved:                LONGINT;                                { Reserved }
  569.     END;
  570.  
  571.     VDVideoParametersInfoPtr = ^VDVideoParametersInfoRec;
  572.  
  573.     VDGammaInfoRec = RECORD
  574.         csLastGammaID:            GammaTableID;                            { the ID of the previous gamma table }
  575.         csNextGammaID:            GammaTableID;                            { the ID of the next gamma table }
  576.         csGammaPtr:                Ptr;                                    { Ptr to a gamma table data }
  577.         csReserved:                LONGINT;                                { Reserved }
  578.     END;
  579.  
  580.     VDGammaInfoPtr = ^VDGammaInfoRec;
  581.  
  582.     VDGetGammaListRec = RECORD
  583.         csPreviousGammaTableID:    GammaTableID;                            { ID of the previous gamma table }
  584.         csGammaTableID:            GammaTableID;                            { ID of the gamma table following csPreviousDisplayModeID }
  585.         csGammaTableSize:        LONGINT;                                { Size of the gamma table in bytes }
  586.         csGammaTableName:        ^CHAR;                                    { Gamma table name (c-string) }
  587.     END;
  588.  
  589.     VDGetGammaListPtr = ^VDGetGammaListRec;
  590.  
  591.     VDRetrieveGammaRec = RECORD
  592.         csGammaTableID:            GammaTableID;                            { ID of gamma table to retrieve }
  593.         csGammaTablePtr:        ^GammaTbl;                                { Location to copy desired gamma to }
  594.     END;
  595.  
  596.     VDRetrieveGammaPtr = ^VDRetrieveGammaRec;
  597.  
  598.     VDSetHardwareCursorRec = RECORD
  599.         csCursorRef:            Ptr;                                    { reference to cursor data }
  600.         csReserved1:            UInt32;                                    { reserved for future use }
  601.         csReserved2:            UInt32;                                    { should be ignored }
  602.     END;
  603.  
  604.     VDSetHardwareCursorPtr = ^VDSetHardwareCursorRec;
  605.  
  606.     VDDrawHardwareCursorRec = RECORD
  607.         csCursorX:                SInt32;                                    { x coordinate }
  608.         csCursorY:                SInt32;                                    { y coordinate }
  609.         csCursorVisible:        UInt32;                                    { true if cursor is must be visible }
  610.         csReserved1:            UInt32;                                    { reserved for future use }
  611.         csReserved2:            UInt32;                                    { should be ignored }
  612.     END;
  613.  
  614.     VDDrawHardwareCursorPtr = ^VDDrawHardwareCursorRec;
  615.  
  616.     VDSupportsHardwareCursorRec = RECORD
  617.         csSupportsHardwareCursor: UInt32;
  618.         { true if hardware cursor is supported }
  619.         csReserved1:            UInt32;                                    { reserved for future use }
  620.         csReserved2:            UInt32;                                    { must be zero }
  621.     END;
  622.  
  623.     VDSupportsHardwareCursorPtr = ^VDSupportsHardwareCursorRec;
  624.  
  625.     VDHardwareCursorDrawStateRec = RECORD
  626.         csCursorX:                SInt32;                                    { x coordinate }
  627.         csCursorY:                SInt32;                                    { y coordinate }
  628.         csCursorVisible:        UInt32;                                    { true if cursor is visible }
  629.         csCursorSet:            UInt32;                                    { true if cursor successfully set by last set control call }
  630.         csReserved1:            UInt32;                                    { reserved for future use }
  631.         csReserved2:            UInt32;                                    { must be zero }
  632.     END;
  633.  
  634.     VDHardwareCursorDrawStatePtr = ^VDHardwareCursorDrawStateRec;
  635.  
  636.     VDConvolutionInfoRec = RECORD
  637.         csDisplayModeID:        DisplayModeID;                            { the ID of the resolution we want info on }
  638.         csDepthMode:            DepthMode;                                { The bit depth we want the info on (0x80 based) }
  639.         csPage:                    LONGINT;
  640.         csFlags:                UInt32;
  641.         csReserved:                UInt32;
  642.     END;
  643.  
  644.     VDConvolutionInfoPtr = ^VDConvolutionInfoRec;
  645.  
  646.     VDPowerStateRec = RECORD
  647.         powerState:                LONGINT;
  648.         powerFlags:                LONGINT;
  649.         powerReserved1:            LONGINT;
  650.         powerReserved2:            LONGINT;
  651.     END;
  652.  
  653.     VDPowerStatePtr = ^VDPowerStateRec;
  654.  
  655.  
  656. {$ALIGN RESET}
  657. {$POP}
  658.  
  659. {$SETC UsingIncludes := VideoIncludes}
  660.  
  661. {$ENDC} {__VIDEO__}
  662.  
  663. {$IFC NOT UsingIncludes}
  664.  END.
  665. {$ENDC}
  666.